#include <iostream>
using namespace std;

float g_result[300];

int main()
{
	int n = 1;
	float sum = 0;

	while (sum < 5.20)
	{
		sum += 1.0 / (n+1);
		g_result[n] = sum;
		++n;
	}

	cin >> sum;
	while ((int)(100 * sum) > 0)
	{
		for (int i = 276; i >= 0; --i)
		{
			if (g_result[i] < sum)
			{
				cout << i + 1 << " card(s)"<< endl;
				break;
			}
		}
		cin >> sum;
	}

	return 0;
}
